package cj.web.prize.dao;
/*
 *  
 *  
*/
import java.util.List;

import net.paoding.rose.jade.annotation.DAO;
import net.paoding.rose.jade.annotation.SQL;
import net.paoding.rose.jade.annotation.SQLParam;
import cj.web.prize.domain.PrizeGift;

/**
 * 
 * @author 
 *
 */
@DAO
public interface PrizeGiftDAO{
    //----------以下两个SQL语句在判断概率的时候 用到误删除
    @SQL("SELECT * FROM PrizeGift WHERE active_id=:1 ORDER BY order_no ")
    List<PrizeGift> queryByActiveId(int activeId);
    
    @SQL("UPDATE PrizeGift SET count = count -1 WHERE active_id=:1 AND name=:2 ")
	void updateCountByActiveId(int activeId,String name);
}